A conventional interfaced software object provides software services, such as methods or properties, that are accessed by one or more interfaces. A method is typically a function or procedure that performs a specific action and is called via a corresponding interface. A property is typically information or data and is also called via a corresponding interface. Objects are commonly implemented in a server that, for example, may be a dynamic link library utilized by a software program or may be an entirely separate executable process.
Conventional objects include the characteristic of interface inheritance in which the definitions of the methods that an interface supports may be inherited by another interface. The interfaces may be of different objects that may or may not be of the same class of objects. An object supporting an inherited interface can be treated like the object from which the interface is inherited. Such objects may be implemented by or in accordance with many object-oriented programming tools or models including, for example, the component object model (COM).
An interface of an object may not be changed once the design and implementation of the interface is complete and the object is established, distributed, or promulgated for general run-time use. Adding new services to or modifying existing services in such an object requires that a new interface be defined in a design-time operation. The new interface would then be distributed or promulgated for general run-time use. The new interface may inherit services from an existing interface, but the new interface remains distinct and has a unique identifier. Despite interface inheritance, therefore, interfaces remain static once they have been established, distributed, or promulgated for use at run-time.
Another aspect of some conventional interfaced software objects, such as OLE/ActiveX objects according to the component object model, is the binding of events between objects. Events provide a mechanism by which an object initiating an event can notify other objects of the event. Event binding provides interaction between objects and their interfaces that can result in greater functionality or interactivity for a user. An example of an application illustrating the benefits of event binding is an interactive virtual world environment that represents a real or imaginary place using graphic and audio data for presenting the place to a computer user and allowing the user to interact with it.
Objects with conventional interfaces and conventional event binding can be used to provide users of a virtual world environment with a predefined environment with which the user can interact. In a virtual world environment objects and their interfaces can be used to represent and control operation an interaction of various entities, objects, and places in the virtual world environment. Within this context, conventional event binding can provide a mechanism by which information about an action by one object (e.g., an avatar representing a user) in the virtual world environment can be passed or broadcast to other objects in the virtual world environment. Based upon this information, other objects in the virtual world environment can initiate other actions or methods.
For example, an announcement event could be triggered in a virtual world environment when an avatar represented by an object interface enters a new area (e.g., room) of the virtual world environment. The announcement could be a notification that is broadcast to any other users (avatars) in the area to notify them of the new arrival. Each of the other avatars in the area can have predetermined methods that are executed in response to receiving the announcement event.
The virtual reality modeling language, VRML, which is an off-shoot of the hyper-text modeling language (HTML), also includes a mechanism for handling event notifications. At a high level of abstraction, VRML is simply a file format for describing objects. The objects can contain virtually any data type--3D geometry, MIDI data, JPEG images, and so on. VRML defines a set of objects useful for doing displaying graphics, multi-media, and interactive object/world building. These objects are called nodes, and they contain events and elemental data that are stored in fields.
Most nodes have at least one eventIn definition and thus can receive events. Incoming events are data messages sent by other nodes (i.e., objects) to change some state within the receiving node. Some nodes also have eventOut definitions. These are used to send data messages to destination nodes that some state has changed within the source node.
Like the static nature of conventional interface services, conventional event binding under object models (e.g., COM) and VRML is similarly static. Objects and their interfaces under an object model and nodes under VRML are capable of responding to event notifications that correspond to events that are programmed into the interfaces or nodes when they are created. Once design and implementation of the interface or node is complete and the object or node is established, distributed, or promulgated for general run-time use, the events to which the interface or node is responsive cannot be changed.
Objects with conventional static interfaces and static event binding can be used to provide users of a virtual world environment with a predefined environment with which the user can interact. A disadvantage with objects having conventional static interfaces and static event binding in such an environment is that changes to the environment cannot be made at run-time. Changes must be made by adding interfaces in a design-time operation. This restricts the level of interaction or control that users can have with or over the environment. In some applications such as virtual world environments the lack of flexibility in interface definitions can pose an undesirable limitation.
In accordance with the present invention, therefore, a dynamic or latebound event mechanism provides event mechanism operation according to associational relationships among objects. In addition, objects may be responsive to event notification methods that are not initially within the original object definition, thereby allowing the event notification methods to be inherited by objects dynamically during run-time. This latebound event mechanism and dynamic inheritance may be provided within the context of an object model, such as the component object model, that supports only design-time interface inheritance. As applied in a virtual world environment, for example, latebound event mechanism and dynamic inheritance can provide users with increased levels of interaction or control.
In applying the latebound event mechanism of this invention to a virtual world environment, for example, the objects may correspond to the entities that would arise within the virtual world environment. Entities are the graphical beings, articles, and even space or room within the virtual world environment, as well as the underlying objects for implementing them. The objects have associational relationships primarily represent the physical or corporeal distinctions between entities.
One implementation utilizes the associations Self, Contents, Peer, and Container. The being or article entity initiating an event is its own Self relative to and separate from other entities. The associations are made relative to this Self entity. The space or room of the virtual world environment within which the Self entity is located or is one of the contents has a Contents association. Other being or article entities in the area with the Contents relationship are Peers of the Self entity. A Self entity capable of containing one or more other article entities has a Container association. While such a Container entity would also be a Peer of the other entities, it is assigned to an associational class Container to reflect its functionality.
Event notification methods are promulgated among the objects corresponding to the entities in a sequence based upon the associational relationships between the entities. For an event fired or triggered with regard to one of the entities within the virtual world environment (e.g., a Self entity with the arbitrary name FOO), an event notification method is passed to any objects contained within the FOO entity (i.e., objects for which the FOO entity is the Container) before event notification methods are promulgated to objects of other entities. An event notification method is then passed to objects within the object corresponding to the Content entity that contains the FOO entity (e.g., a room within the virtual world environment). Event notification methods are then passed successively to the objects corresponding to the FOO entity itself (i.e., the Self entity) and finally to any Peer entities of the FOO entity.
The event notification methods relating to the Container, Contents, Self, and Peer entities may be designated OnContainerFoo, OnContentsFoo, OnFoo, and OnPeerFoo, respectively, where in this case "Foo" is the name of the event. Each event notification method can have particular functionality according to the particular event and the entity receiving the notification.
This sequence of event notification methods provides propagation of events in a manner that reflects common causal sequences to improve the appearance of reality provided by the virtual world environment. Passing the first event notification method to objects contained within the entity (i.e., Container) initiating the event allows the method to be applied to any contained entity under the control of the Container entity. If methods were applied to contained entities after being applied to their Container, the later changes to contained entities could cause unpredictable or incongruous changes to the Container. For a similar reason the event notification method is passed next to the Content entity that contains the entity initiating the event. Subsequently passing event notification methods to the Self entity and the Peer entities provides an event sequence that represents the propagation of causal effects from an event and thereby provides an improved representation of a virtual world environment. This event notification may be utilized with or without dynamic inheritance.
In providing dynamic inheritance, hierarchical relationships are defined between multiple objects such that each object references or is referenced by another object. One of the objects is a root object that is referenced by at least one other object but that does not reference another object. A call is made for a particular service (e.g., an event notification method) at a selected object. The service is provided directly from the object whenever the service is available therefrom.
Whenever the selected service is unavailable at the selected object, the call is passed to a referenced object (i.e., an object that is referenced by the selected object). The service is provided directly from the referenced whenever the service is available therefrom or the call is passed to yet another referenced object until the service can be provided. The call may be passed to multiple successive referenced objects until the call reaches the root object, which either provides the service or the service is deemed unavailable.
Another aspect of dynamic inheritance is that an object model interface may include one or more methods for adding or otherwise changing the methods or properties available from that interface. The changes in the methods or properties may be made at run-time, after the interface has been otherwise fixed or established.
In one implementation, the interface includes an AddMethod method that adds a designated method to the interface at run-time to make the method available from the interface. Similarly, the interface includes an AddProperty method that adds a designated property to a designated interface at run-time to make the property available from the interface. An InvokeMethod method allows a user to execute the designated method, and other methods can allow other access to and control over the methods and properties. Methods and properties available for implementation or access by these dynamic inheritance methods may be in a dynamic inheritance listing, such as a table, that indicates the names of the methods and properties, defines the services they provide, and includes unique identifiers for them.